<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
<base href="<%=basePath%>">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>后台</title>
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/overlay.css" rel="stylesheet">
<link href="css/gstyle-final.css" rel="stylesheet">
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<style type="text/css">
.page a.on{background:#08c;color:#fff;}
</style>
</head>

<body style="background-color: #fff">
	<div class="container"  style="width: 90%">
		<div>
		<h1 class="page-header">后台管理
		<a href="index.action" style="float: right;font-size: xx-small;font-weight: normal;">返回首页</a>
		<a href="logout.jsp" style="float: right;font-size: xx-small;font-weight: normal;">注销|</a>
		<a href="#tab5" data-toggle="tab" style="float: right;font-size: xx-small;font-weight: normal;">修改密码|</a>
		<span style="float: right;font-size: xx-small;font-weight: normal;">欢迎你 ${sessionScope.user.username}|</span>
		</h1>
		<input type="hidden" id="type"/>
		</div>
		<div class="tabbable tabs-left">
			<ul class="nav nav-tabs">
				<li><h5>页面管理</h5></li>
				<li class="active"><a href="#tab1" data-toggle="tab">首页图像轮播管理</a></li>
				<li><a href="#tab2" data-toggle="tab">关于页面图片管理</a></li>
				<li><h5>客服</h5></li>
				<li><a href="#tab3" data-toggle="tab">公告管理</a></li>
				<li><a href="#tab6" data-toggle="tab">服务管理</a></li>
				<li><a href="#tab7" data-toggle="tab">邮件管理</a></li>
				<li><h5>用户</h5></li>
				<li><a href="#tab4" data-toggle="tab">用户管理</a></li>
			</ul>
			<div class="tab-content" style="height: 80%;">
				<div class="tab-pane active" id="tab1">
					<s:action name="ImgTurn" executeResult="true" namespace="/"/>
				</div>
				<div class="tab-pane" id="tab2" style="overflow: auto;">
					<s:action name="showAboutPic" executeResult="true" namespace="/"/>
				</div>
				<div class="tab-pane" id="tab3" style="overflow: auto;">
					<%@include file="noticeMgr.jsp"%>
				</div>
				<div class="tab-pane" id="tab4" style="overflow: auto;">
					<s:action name="findMgr" executeResult="true" namespace="/"/>
				</div>
				<div class="tab-pane" id="tab5" style="overflow: auto;">
					<%@include file="changePW.jsp"%>
				</div>
				<div class="tab-pane" id="tab6" style="overflow: auto;">
					<%@include file="service.jsp"%>
				</div>
				<div class="tab-pane" id="tab7" style="overflow: auto;">
					<%@include file="mail.jsp"%>
				</div>
			</div>
		</div>
	</div>
	
	<!-- 弹出层 -->
	<div id="light" class="white_content">
		<a href = "javascript:void(0)" onclick = "closeDiv()" style="float:right;">关闭</a>
		<div id="imgInfo">
			
		</div>
	</div> 
        <div id="fade" class="black_overlay"></div> 
        
	<script src="bootstrap/js/jquery-1.10.2.js"></script>
	<script src="backadmin/js/jquery.form.js"></script>
	<script src="backadmin/js/img.js"></script>
	<script src="backadmin/js/notice.js"></script>
	<script src="backadmin/js/user.js"></script>
	<script src="backadmin/js/service.js"></script>
	<script src="backadmin/js/mail.js"></script>
	<script src="bootstrap/js/bootstrap.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			var userSession = "<%=session.getAttribute("user")%>"; 
			if(userSession == "null"){
				alert("请登录");
				window.location.href="login.jsp";
			}
			var role = parseInt("${sessionScope.user.role}");
			switch(role){
				case 1:$("#tab3").html("您没有权限");$("#tab4").html("您没有权限");$("#tab6").html("您没有权限");$("#tab7").html("您没有权限");
				break;
				case 2:$("#tab1").html("您没有权限");$("#tab2").html("您没有权限");$("#tab4").html("您没有权限");
				break;
			}
			$('.carousel').carousel({
				 interval: 3000
			});
		});
	</script>
</body>
</html>
